<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-6-13
  Time: 8:35
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://www.centit.com/el/coderepo" prefix="cp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<html>
<head>
<meta charset="utf-8">
<title>东航机队管理系统</title>
<!-- 视口不可缩放 -->
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/layui/css/layui.css"
	media="all" />
<link rel="stylesheet"
	href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all" />
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/main.css"
	media="all" />
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/drag.css"
	media="all" />
<script type="text/javascript"
	src="${cp:SYS_VALUE('app.staticfile.home')}/ui/js/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript"
	src="${cp:SYS_VALUE('app.staticfile.home')}/ui/js/plugins/jquery.i18n.properties-min-1.0.9.js"></script>
<script src="${cp:SYS_VALUE('app.staticfile.home')}/vue/layui/alert.js"
	charset="utf-8"></script>
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/floatcommon.css" />
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/floatdrag.css" />
<link rel="stylesheet"
	href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/floatindex.css" />
<script
	src="${cp:SYS_VALUE('app.staticfile.home')}/vue/js/angular-1.5.8.min.js"></script>
<script src="${cp:SYS_VALUE('app.staticfile.home')}/vue/js/floatdrag.js"></script>
<script
	src="${cp:SYS_VALUE('app.staticfile.home')}/vue/js/floatindex.js"></script>
<script type="text/javascript"
	src="${cp:SYS_VALUE('app.staticfile.home')}/modules/dashboard/ctrl/dashboard.js"></script>
<script>
        window.ContextPath = '<%=request.getContextPath()%>	/';
	window.pageContextPath = "${pageContext.request.contextPath}/"
	window.ViewContextPath = '${cp:SYS_VALUE("app.staticfile.home")}/';
	window.UploaderPath = '${cp:SYS_VALUE("uploaderpath")}/';
	window.nginxpath = '${cp:SYS_VALUE("nginxpath")}/';
	// Js全局变量，在Js文件中使用
	// Js全局变量，在Js文件中使用
	var GLOBAL_IDENTIFY = {
		// 登录入口类型 是否为实施人员入口
		IS_DEVELOP : '${"DEPLOY" eq sessionScope.ENTRANCE_TYPE}' == 'true',
		userCode : '${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.userCode}',
		socket_host : '${cp:SYS_VALUE("socketio.host")}',
		socket_port : '${cp:SYS_VALUE("socketio.port")}',
		enable : '${cp:SYS_VALUE("socketio.enable")}' == 'true',
		username : '${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.userInfo.userName}'
	};
</script>
<style type="text/css">
.massageDiv {
	width: 63px;
	position: fixed;
	float: right;
	right: 5px;
	bottom: 50px;
	cursor: pointer;
	display: block;
}
</style>
</head>
<body class="main_body rel-pos" ng-app="appModule"
	ng-controller="appController" ng-init="init()">
		<div class="gray-mask fix-pos" ng-show="showFlag"></div>


		<div class="layui-layout layui-layout-admin">

			<input type="hidden" id="module" value="${module}" /> <input
				type="hidden" id="detailId" value="${detailId}" />
			<!-- 顶部 -->
			<div class="layui-header header"
				style="height: 80px;">
				<a href="javascript:;" class="iconfont hideMenu icon-menu1"
						style="margin-top: 20%; margin-left: 200px; position: fixed;float: left;"></a>
				<div class="layui-main">
					<!-- 显示/隐藏菜单 -->
						<div style="height: 80px;width: 200px;background: url('${cp:SYS_VALUE('app.staticfile.home')}/vue/images/titlePng.png') center no-repeat;background-size: 100% 98%;float: left;"></div>
						<div style="float: left;font-size: 35px;font-weight: bolder;width: 290px;letter-spacing:5px;text-align: center;margin-top: 15px;color: #1070D2">
						机队管理系统
						</div>
					<!-- 天气信息 -->
					<%--<div class="weather" pc>
                <div id="tp-weather-widget"></div>
                <script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
                <script>tpwidget("init", {
                    "flavor": "slim",
                    "location": "WX4FBXXFKE4F",
                    "geolocation": "enabled",
                    "language": "zh-chs",
                    "unit": "c",
                    "theme": "chameleon",
                    "container": "tp-weather-widget",
                    "bubble": "disabled",
                    "alarmType": "badge",
                    "color": "#FFFFFF",
                    "uid": "U9EC08A15F",
                    "hash": "039da28f5581f4bcb5c799fb4cdfb673"
                });
                tpwidget("show");</script>
            </div>--%>
					<!-- title -->
					<div
						style="font-size: 35px; color: #FFF; margin-left: 100px; float: left; margin-top: 25px;"></div>
					<!-- 顶部右侧菜单 -->
					<ul class="layui-nav top_menu" style="margin-top: 20px">
						<%-- <li class="layui-nav-item optwindow" id="optwindow" pc>
                     <a href="javascript:window.location.href='${cp:SYS_VALUE('app.staticfile.home')}/system/layui/dashWindow';"><i class="iconfont icon-gonggao"></i><cite>办公桌面</cite></a>
                 </li>--%>
						<!-- 
                <li class="layui-nav-item optwindow" id="optwindow" pc>
                    <a href="javascript:window.location.href='${cp:SYS_VALUE('app.staticfile.home')}/system/layui/dashWindow';"><i
                            class="iconfont icon-gonggao"></i><cite>办公桌面</cite></a>
                </li> -->
						<%-- <li class="layui-nav-item showNotice" id="showNotice" pc>
                     <a href="javascript:;"><i class="iconfont icon-gonggao"></i><cite>系统公告</cite></a>
                 </li>--%>
						<li class="layui-nav-item" mobile><a href="javascript:;"
							class="mobileAddTab"
							data-url="${cp:SYS_VALUE('app.staticfile.home')}/vue/page/user/changePwd.html"><i
								class="iconfont icon-shezhi1" data-icon="icon-shezhi1"></i><cite>设置</cite></a>
						</li>
						<li class="layui-nav-item" mobile><a
							href="${cp:SYS_VALUE('app.staticfile.home')}/vue/page/login/login.html"
							class="signOut"><i class="iconfont icon-loginout"></i> 退出</a></li>
						<%-- <li class="layui-nav-item lockcms" pc>
                     <a href="javascript:;"><i class="iconfont icon-lock1"></i><cite>锁屏</cite></a>
                 </li>--%>
						<li class="layui-nav-item" style="line-height: 40px" pc><a href="javascript:;"> <i
								class="iconfont icon-lock1"></i><cite style="color: #1D4194">${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.userInfo.userName}</cite>
						</a>
							<dl class="layui-nav-child" style="width: 110px;">
								<!-- 
                        <dd><a href="javascript:viewUserInfo();"><i class="iconfont icon-zhanghu"
                                                                    data-icon="icon-zhanghu"></i><cite>个人资料</cite></a>
                        </dd> -->
								<dd>
									<a href="javascript:modifyInfo();"><i
										class="iconfont icon-shezhi1" data-icon="icon-shezhi1"></i><cite>修改密码</cite></a>
								</dd>
								<%-- <dd><a href="javascript:;" class="changeSkin"><i class="iconfont icon-huanfu"></i><cite>更换皮肤</cite></a></dd>--%>
								<dd>
									<a
										href="${cp:SYS_VALUE('app.staticfile.home')}/system/layui/logout"
										class="signOut"><i class="iconfont icon-loginout"></i><cite>退出</cite></a>
								</dd>
							</dl></li>
					</ul>
				</div>
			</div>

			<!-- 左侧导航 -->
			<div class="layui-side layui-bg-black" style="top: 80px">
				<div class="navBar layui-side-scroll"></div>

				<!-- 
        <div id="message" style="position: fixed;float: right;right:50px;bottom:30px;width:49px;cursor:pointer;display:block;" onclick="openPage()">
				    	<img alt="消息提醒" src="${pageContext.request.contextPath}/style/images/message.png" height="41" >
				    	<div id="messageTitle" style="position: absolute;margin-left:43px;margin-top:-53px">
				    		<font color="red">
				    			<p id = "messageCount">(0)</p>
				    		</font>
				    	</div>
				    	<p id="messageTitle" style="margin-left:8px;"><font color="black">消息</font></p>
				    </div>
				     -->

			</div>
			<!-- 右侧内容 -->

			<div class="layui-body layui-form" style="top: 76px; bottom: 0px">
				<div class="layui-tab marg0" lay-filter="bodyTab" id="top_tabs_box">
					<ul class="layui-tab-title top_tab" id="top_tabs">
						<li class="layui-this" lay-id=""><i
							class="iconfont icon-computer"></i> <cite>我的首页</cite></li>
					</ul>
					<ul class="layui-nav closeBox">
						<li class="layui-nav-item"><a href="javascript:;"><i
								class="iconfont icon-caozuo"></i> 页面操作</a>
							<dl class="layui-nav-child" style="z-index: 1003">
								<dd>
									<a href="javascript:;" class="refresh refreshThis"><i
										class="layui-icon">&#x1002;</i> 刷新当前</a>
								</dd>
								<dd>
									<a href="javascript:;" class="closePageOther"><i
										class="iconfont icon-prohibit"></i> 关闭其他</a>
								</dd>
								<dd>
									<a href="javascript:;" class="closePageAll"><i
										class="iconfont icon-guanbi"></i> 关闭全部</a>
								</dd>
							</dl></li>
					</ul>
					<div class="layui-tab-content clildFrame">
						<div class="layui-tab-item layui-show">
							<c:choose>
								<c:when test="${homeflag eq 'xmgl'}">
									<iframe
										src="${cp:SYS_VALUE('nginxpath')}/${homeflag}/modules/project/projectReport.jsp"></iframe>
								</c:when>
								<c:when test="${homeflag eq 'partybuild'}">
									<iframe
										src="${cp:SYS_VALUE('nginxpath')}/${homeflag}/service/dwgl/dygl/djgldyjbxxb/wdxx"></iframe>
								</c:when>
								<c:otherwise>
									<%--默认首页--%>
									<iframe
										src="${cp:SYS_VALUE('app.staticfile.home')}/vue/page/main.jsp"></iframe>
								</c:otherwise>
							</c:choose>


						</div>

					</div>
				</div>
			</div>
			<!-- 底部 -->
			<%--<div class="layui-footer footer">
        <p>copyright @2018 南大先腾　　</p>
    </div>--%>
		</div>

		<!-- 移动导航 -->
		<div class="site-tree-mobile layui-hide">
			<i class="layui-icon">&#xe602;</i>
		</div>
		<div class="site-mobile-shade"></div>

		<script type="text/javascript"
			src="${cp:SYS_VALUE('app.staticfile.home')}/vue/layui/layui.js"></script>
		<script type="text/javascript"
			src="${cp:SYS_VALUE('app.staticfile.home')}/vue/js/leftNav.js"></script>
		<script type="text/javascript"
			src="${cp:SYS_VALUE('app.staticfile.home')}/vue/js/index.js"></script>
</body>
<script>
	var basePath = "${pageContext.request.contextPath}";
	function setOptS() {
		var openid = '${openid}';
		var detailId = '${detailId}';
		if (openid != "" && openid != "undefined"
				&& $("a[id='" + openid + "']") != "undefined") {
			//layui-this
			$("a[id='" + openid + "']").click();
			$("a[id='" + openid + "']").parents("li").addClass(
					"layui-nav-itemed");
			$("a[id='" + openid + "']").parents("dd").addClass(
					"layui-nav-itemed");
		} else if (detailId != "" && detailId != "undefined"
				&& $("a[id='" + detailId + "']") != "undefined") {
			$("a[id='" + detailId + "']").click();
			$("a[id='" + detailId + "']").parents("li").addClass(
					"layui-nav-itemed");
			$("a[id='" + detailId + "']").parents("dd").addClass(
					"layui-nav-itemed");
		}
		setcaidan();
	}
	/*     function openPage(){
	 var index = layui.layer.open({
	 title: "查看消息",
	 type: 2,
	 skin: 'layui-layer-molv',
	 content: basePath +"/modules/messageRemind/mesRemind.jsp",
	 area: ['970px', '640px'],
	 offset: 't',
	
	 })
	 }
	 $(function () {
	 $.ajax({
	 type: "GET",
	 url: basePath +"/service/ssqxjd/messageremind/isNotRead",
	 dataType: "json",
	 async: false,
	 success: function (data) {
	 $("#messageCount").text("("+data.data+")")
	 }
	 });
	
	 }); 
	 */
	function setcaidan() {
		var module = '${module}';
		if (module == "doctrans") {
			url = window.ViewContextPath + "system/todoItem/loadDbinfo";
			var mapID = {
				'dyj' : 'WDDYJ',
				'sw' : 'WDDBSW',
				'fw' : 'WDDBFW',
				'ys' : 'WDDYS',
				'qf' : 'WDDQF',
				'pf' : 'DSH',
				'ypf' : 'WDDPF',
				'zwh' : 'WDZWH',
				'pb' : 'WDPB',
				'gz' : 'WDGZ',
				'wy' : 'wy',
				'yh' : 'BGSYH',
				'jysh' : 'WDJYS'
			};
			/*mapID.push('dyj','WDDYJ');//待阅件
			mapID.push('sw','WDDBSW');//待办收文
			mapID.push('fw','WDDBFW');//待办发文
			// mapID.push('','WDDBJ');//待办件
			mapID.push('ys','WDDYS');//待阅示
			mapID.push('qf','WDDQF');//待签发
			// mapID.push('','WDZH');//暂缓列表
			mapID.push('pf','WDDPF');//待批分
			mapID.push('zwh','WDZWH');//置文号
			mapID.push('pb','WDPB');//排版印刷
			mapID.push('gz','WDGZ');//盖章
			mapID.push('wy','wy');//文印
			mapID.push('yh','BGSYH');//阅核
			// mapID.push('','WDJYS');//收发室待审核
			alert(JSON.stringify(mapID));*/
			$.ajax({
				type : "get",
				url : url,
				dataType : "json",
				async : false,
				success : function(data) {
					$("#WDDB").parent().find("a").find(
							"span[class='layui-badge']").remove();
					$.each(data.data.objList, function(i, value) {
						/* $("#"+mapID[value.itemState]).find("span").remove();*/
						$("#" + mapID[value.itemState]).append(
								"<span class = 'layui-badge' >" + value.count
										+ "</span >");
					})
				},
				error : function() {
				}
			});
		}
	}
</script>
</html>
